package org.jeecg.modules.flowable.common.util.validation;


import org.jeecg.modules.flowable.common.util.validation.exception.MustParamException;

/**
 * Title:  必添参数验证
 * Desc:  <br>
 * Date: 5/21/22 8:50 AM <br>
 * Company: 联通（辽宁）产业互联网有限公司 <br>
 *
 * @author zxd
 * @version 1.0.0
 */
public class MustParamValidation {

    /**
     * 必填参数验证
     *
     * @param param
     * @throws MustParamException
     */
    public static void mustValidation(Object... param) throws MustParamException {
        Object[] param1 = param;
        for (int i = 0; i < param1.length; i++) {
            if (param1[i] == null || param1[i].toString().trim().equals("")) {
                throw new MustParamException("必须的参数不能为空");
            }
        }
    }
}
